import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("mall_order",{schema:"nest-mall" } )
@Index("order_sn",["orderSn",],{unique:true})
@Index("user_id",["userId",])
@Index("order_status",["orderStatus",])
@Index("shipping_status",["shippingStatus",])
@Index("pay_status",["payStatus",])
@Index("shipping_id",["shippingId",])
@Index("pay_id",["payId",])
export class MallOrder {

    @PrimaryGeneratedColumn({
        type:"mediumint", 
        name:"id"
        })
    id:number;
        

    @Column("varchar",{ 
        nullable:true,
        unique: true,
        length:32,
        name:"order_sn"
        })
    orderSn:string | null;
        

    @Column("mediumint",{ 
        nullable:true,
        default: () => "'0'",
        name:"user_id"
        })
    userId:number | null;
        

    @Column("int",{ 
        nullable:true,
        default: () => "'0'",
        name:"order_status"
        })
    orderStatus:number | null;
        

    @Column("tinyint",{ 
        nullable:true,
        default: () => "'0'",
        name:"shipping_status"
        })
    shippingStatus:number | null;
        

    @Column("tinyint",{ 
        nullable:true,
        default: () => "'0'",
        name:"pay_status"
        })
    payStatus:number | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:60,
        name:"consignee"
        })
    consignee:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        name:"country"
        })
    country:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        name:"province"
        })
    province:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        name:"city"
        })
    city:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        name:"district"
        })
    district:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"address"
        })
    address:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:60,
        name:"mobile"
        })
    mobile:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"postscript"
        })
    postscript:string | null;
        

    @Column("tinyint",{ 
        nullable:true,
        default: () => "'0'",
        name:"shipping_id"
        })
    shippingId:number | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:120,
        name:"shipping_name"
        })
    shippingName:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:64,
        default: () => "'0'",
        name:"pay_id"
        })
    payId:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:120,
        name:"pay_name"
        })
    payName:string | null;
        

    @Column("decimal",{ 
        nullable:true,
        default: () => "'0.00'",
        scale:2,
        name:"shipping_fee"
        })
    shippingFee:string | null;
        

    @Column("decimal",{ 
        nullable:true,
        default: () => "'0.00'",
        scale:2,
        name:"actual_price"
        })
    actualPrice:string | null;
        

    @Column("int",{ 
        nullable:true,
        default: () => "'0'",
        name:"integral"
        })
    integral:number | null;
        

    @Column("decimal",{ 
        nullable:true,
        default: () => "'0.00'",
        scale:2,
        name:"integral_money"
        })
    integralMoney:string | null;
        

    @Column("decimal",{ 
        nullable:true,
        default: () => "'0.00'",
        scale:2,
        name:"order_price"
        })
    orderPrice:string | null;
        

    @Column("decimal",{ 
        nullable:true,
        default: () => "'0.00'",
        scale:2,
        name:"goods_price"
        })
    goodsPrice:string | null;
        

    @Column("datetime",{ 
        nullable:true,
        name:"add_time"
        })
    addTime:Date | null;
        

    @Column("datetime",{ 
        nullable:true,
        name:"confirm_time"
        })
    confirmTime:Date | null;
        

    @Column("datetime",{ 
        nullable:true,
        name:"pay_time"
        })
    payTime:Date | null;
        

    @Column("int",{ 
        nullable:true,
        default: () => "'0'",
        name:"freight_price"
        })
    freightPrice:number | null;
        

    @Column("mediumint",{ 
        nullable:true,
        default: () => "'0'",
        name:"coupon_id"
        })
    couponId:number | null;
        

    @Column("mediumint",{ 
        nullable:true,
        default: () => "'0'",
        name:"parent_id"
        })
    parentId:number | null;
        

    @Column("decimal",{ 
        nullable:true,
        scale:2,
        name:"coupon_price"
        })
    couponPrice:string | null;
        

    @Column("enum",{ 
        nullable:true,
        default: () => "'true'",
        enum:["true","false"],
        name:"callback_status"
        })
    callbackStatus:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:32,
        name:"shipping_no"
        })
    shippingNo:string | null;
        

    @Column("decimal",{ 
        nullable:true,
        scale:2,
        name:"full_cut_price"
        })
    fullCutPrice:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:1,
        name:"order_type"
        })
    orderType:string | null;
        
}
